/**
 * @file FloodFillTool.cpp
 *
 * @date 25/12/2011
 * @author Tales 
 *
 */

#include "FloodFillTool.hpp"
#include "../model/Picture.hpp"
#include "Editor.hpp"
#include "../model/FloodFillCommand.hpp"

namespace yep
{

FloodFillTool::FloodFillTool()
{
}

void FloodFillTool::start()
{
	buttonPressed = false;
}

void FloodFillTool::end()
{
}

void FloodFillTool::pressed(pair<int, int> pos, bool leftButton, bitset<5> state)
{
	if(leftButton)
	{
		Picture &pic = getPicture();
		Editor &editor = getEditor();
		pic.addCommand(new FloodFillCommand(pos, editor.getColor(), editor.getCurrentLayer()));
	}
}

void FloodFillTool::released(pair<int, int> pos, bool leftButton, bitset<5> state)
{
}

void FloodFillTool::moved(pair<int, int> pos, pair<int, int> offset, std::bitset<5> state)
{
}

} /* namespace yep */
